package cn.xiaolang.rest.remote;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;

import java.util.Collections;

public class OpenApiRequest extends RestApiRequest {

    @Value("${cove-client.securenet-server-url}")
    @Setter
    @Getter
    private String apiBaseUrl;

    public static void main(String[] args) {
        OpenApiRequest x = new OpenApiRequest();
        x.setApiBaseUrl("http://localhost:8080/bm");
        x.setResourcePath("/setName",null);
        System.out.println(x);


        x.setResourcePath("/getName/{name}", Collections.singletonMap("name","dean"));
        System.out.println(x);



        String execute = RestClientUtil.execute(x, null, String.class);
        System.out.println(execute);
    }
}
